package com.moyun.model.common;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <h3>org</h3>
 * <p>分页参数封装</p>
 *
 * @author : ybx
 * @date : 2021-06-01 10:32:05
 **/
@Getter
@Setter
public class PageParam<T> implements Serializable {

    /**
     * 实体类对象
     */
    @NotNull
    @ApiModelProperty("实体参数")
    private T EntityParams;
    /**
     * 排序相关参数集合
     */
    @NotNull
    @Valid
    @ApiModelProperty("分页参数")
    private PageDTO pageParams;

    public PageParam() {
    }

    public PageParam(T entityParams, long size, long current, String sidx, String sord, PageDTO pageParams) {
        EntityParams = entityParams;
        this.pageParams = pageParams;
    }
}
